package com.company.management.domain.rsp;

import com.company.management.constant.Constants;
import com.company.management.modal.entity.PerformanceResults;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @Author: Administrator
 * @Date: 2025/3/2 15:18
 * @Description: PerformanceResults
 */

/**
 * @author robet
 */
@ApiModel(value = "绩效考核结果对象", description = "绩效考核结果表")
@Data
public class PerformanceEvalResultsResp extends PerformanceResults {
    private String pass;
    public String getPass(){
        if (this.getFisSuccess()==null){
            return Constants.PERFORMANCE_ERROR;
        }
        if(this.getFisSuccess()==1){
            return Constants.PERFORMANCE_SUC;
        }else{
            return Constants.PERFORMANCE_ERROR;
        }
    }
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startDate;
    @ApiModelProperty("结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endDate;
    @ApiModelProperty("考核时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date resCreateTime;
    @ApiModelProperty("考核主题")
    private String evaluationTitle;
    @ApiModelProperty("考核内容")
    private byte[] evaluationContent;

    @ApiModelProperty("考核内容明碼")
    private String content;

    @ApiModelProperty("考核人名稱")
    private String userName;

    @ApiModelProperty("創建人")
    private String createName;
}
